package com.cevent.community.app.common.dto;/**
 * Created by Cevent on 2021/9/14.
 */

import java.util.List;

/**
 * @author cevent
 * @description 分页对象
 * @date 2021/9/14 9:53
 */
public class PageDto<T> {
    //1.当前页码
    protected int pageCurrent;
    //2.每页条数
    protected int pageSize;
    //4.总条数(pageInfo处理的total属性为long)
    protected Long totalSize;
    //5.查询记录放入list
    protected List<T> pageDataList;

    public int getPageCurrent() {
        return pageCurrent;
    }

    public void setPageCurrent(int pageCurrent) {
        this.pageCurrent = pageCurrent;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public Long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(Long totalSize) {
        this.totalSize = totalSize;
    }

    public List<T> getPageDataList() {
        return pageDataList;
    }

    public void setPageDataList(List<T> pageDataList) {
        this.pageDataList = pageDataList;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("PageDto{");
        sb.append("pageCurrent=").append(pageCurrent);
        sb.append(", pageSize=").append(pageSize);
        sb.append(", totalSize=").append(totalSize);
        sb.append(", pageDataList=").append(pageDataList);
        sb.append('}');
        return sb.toString();
    }
}
